package com.feihong.txgw.tx_model;

import com.feihong.txgw.http.HttpTools;
import com.feihong.txgw.inter.contract.order.IKaikaOrderDetailContract;
import com.feihong.txgw.model.base_bean.BaseResponse;
import com.feihong.txgw.utils.helper.RxHelper;
import com.feihong.txgw.utils.manage.RetrofitManager;

import io.reactivex.Observable;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName KaikaOrderDetailMainModel
 * @package com.feihong.txgw.tx_model
 * @data 2018/5/8 10:39
 * @Describe
 * @Change
 */
public class KaikaOrderDetailMainModel implements IKaikaOrderDetailContract.IKaikaOrderDetailMainModel {
    @Override
    public Observable<BaseResponse> cannelKaikaOrder(String orderSn, String orderType) {
        return RetrofitManager.getInstance().operateOrder(HttpTools.CANNEL_ORDER_URL_KEY,orderSn, orderType).compose(RxHelper.<BaseResponse>rxSchedulerHelper());
    }

    public static KaikaOrderDetailMainModel create(){
        return new KaikaOrderDetailMainModel();
    }
}
